package com.esri.core.internal.tasks.ags;

import com.esri.core.portal.Portal;
import com.esri.core.portal.PortalQueryParams;
import com.esri.core.portal.PortalRelationshipDirection;
import com.esri.core.portal.PortalRelationshipType;

/* loaded from: classes.dex */
public class al extends com.esri.core.internal.tasks.f {
    private static final String b = "culture";
    private static final String c = "relationshipType";
    private static final String d = "direction";
    private static final long serialVersionUID = 1;
    Portal a;
    private PortalQueryParams e;
    private PortalRelationshipType f;
    private PortalRelationshipDirection g;

    @Override // com.esri.core.internal.tasks.f
    public boolean validate() {
        return true;
    }

    public al(Portal portal) {
        this.a = portal;
        if (portal == null) {
            throw new IllegalArgumentException("Portal == null");
        }
    }

    public PortalQueryParams a() {
        return this.e;
    }

    public void a(PortalQueryParams portalQueryParams) {
        this.e = portalQueryParams;
    }

    public PortalRelationshipType b() {
        return this.f;
    }

    public void a(PortalRelationshipType portalRelationshipType) {
        this.f = portalRelationshipType;
    }

    public PortalRelationshipDirection c() {
        return this.g;
    }

    public void a(PortalRelationshipDirection portalRelationshipDirection) {
        this.g = portalRelationshipDirection;
    }

    /* JADX WARN: Removed duplicated region for block: B:17:0x0031  */
    @Override // com.esri.core.internal.tasks.f
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public java.util.Map<java.lang.String, java.lang.String> generateRequestParams() {
        /*
            r4 = this;
            java.util.LinkedHashMap r0 = new java.util.LinkedHashMap
            r0.<init>()
            java.lang.String r1 = "f"
            java.lang.String r2 = "json"
            r0.put(r1, r2)
            java.lang.String r1 = com.esri.core.portal.Portal.DEFAULT_CULTURE
            if (r1 == 0) goto L17
            java.lang.String r1 = com.esri.core.portal.Portal.DEFAULT_CULTURE
            java.lang.String r2 = "culture"
            r0.put(r2, r1)
        L17:
            com.esri.core.portal.PortalQueryParams r1 = r4.e
            if (r1 == 0) goto L42
            boolean r1 = r1.isCanSearchPublic()
            r2 = 0
            if (r1 != 0) goto L2c
            com.esri.core.portal.Portal r1 = r4.a     // Catch: java.lang.Exception -> L2c
            if (r1 != 0) goto L27
            goto L2c
        L27:
            com.esri.core.portal.PortalInfo r1 = r1.fetchPortalInfo()     // Catch: java.lang.Exception -> L2c
            goto L2d
        L2c:
            r1 = r2
        L2d:
            com.esri.core.portal.PortalQueryParams r3 = r4.e
            if (r1 == 0) goto L35
            java.lang.String r2 = r1.getOrganizationId()
        L35:
            com.esri.core.portal.Portal r1 = r4.a
            boolean r1 = r1.isPreVersion162()
            java.util.Map r1 = r3.generateRequestParams(r2, r1)
            r0.putAll(r1)
        L42:
            com.esri.core.portal.PortalRelationshipType r1 = r4.f
            if (r1 == 0) goto L4f
            java.lang.String r1 = r1.toString()
            java.lang.String r2 = "relationshipType"
            r0.put(r2, r1)
        L4f:
            com.esri.core.portal.PortalRelationshipDirection r1 = r4.g
            if (r1 == 0) goto L5c
            java.lang.String r1 = r1.toString()
            java.lang.String r2 = "direction"
            r0.put(r2, r1)
        L5c:
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.esri.core.internal.tasks.ags.al.generateRequestParams():java.util.Map");
    }
}
